import java.util.Objects;

/**
 * @Description
 */

public class Person {
    String name;
    String id;

    public Person( String id) {

        this.id = id;
    }
    public boolean equals(Object obj){
        //比较内容是否相同时，一定要重写equals方法
        Person tmp = (Person) obj;
        return tmp.id.equals(this.id);
    }

    @Override
    public int hashCode() {
        return Objects.hash(id);
    }

    @Override
    public String toString() {
        return "Person{" +
                "id='" + id + '\'' +
                '}';
    }
}
